<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/index.css">
</head>
<body>
<!‐‐ 关键代码 ‐‐>
<script th:src="@{/webjars/jquery/3.2.1/dist/jquery.min.js}">
</script>
<script
        th:src="@{/webjars/bootstrap/4.3.1/js/bootstrap.min.js}">
</script>
<link rel="stylesheet"
      th:href="@{/webjars/bootstrap/4.3.1/css/bootstrap.min.css}"
/>
<link type="text/css" rel="stylesheet"
      th:href="@{/static/css/style.css}"
/>
<img id="img1" alt="看到我说明图片挂了"
     th:src="@{/static/imgs/a.jpg}" title="帅哥一枚" width="10%" height="10%" class="rounded‐circle">
<button id="btn1" class="btn btn‐info">Click Me!</button>
<div id="div1"></div>
<script type="text/javascript">
    $("#btn1").click(function(){
        $("#img1").attr({"src":"/static/imgs/b.jpg", "title":"小姐姐一名"});
        let val = $("#div1").html();
        if(val.length == 0)
            $("#div1").html("被点出来了...").css({"color":"silver", "font‐size": "24px"});
    else if(val != '')
            $("#div1").html("");
    });
</script>
</body>

</html>